﻿<%@page import="com.cchr.acms.model.Action"%>
<%@page import="com.cchr.acms.model.AbuseType"%>
<%@page import="com.cchr.acms.util.HtmlComponentUtil.SelectOption"%>
<%@page import="java.util.List"%>
<%@page import="com.cchr.acms.util.HtmlComponentUtil"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.acms.com/acmstag" prefix="acms" %>
<%
	String contextPath = request.getContextPath();
%>
<!DOCTYPE html>
<!--[if IE 8]>         <html class="ie8"> <![endif]-->
<!--[if IE 9]>         <html class="ie9 gt-ie8"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="gt-ie8 gt-ie9 not-ie"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Report Psychiatric Abuse</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

	<!-- Open Sans font from Google CDN -->
	<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin" rel="stylesheet" type="text/css">

	<!-- Pixel Admin's stylesheets -->
	<link href="<%=contextPath%>/assets/stylesheets/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="<%=contextPath%>/assets/stylesheets/pixel-admin.min.css" rel="stylesheet" type="text/css">
	<link href="<%=contextPath%>/assets/stylesheets/pages.min.css" rel="stylesheet" type="text/css">
	<link href="<%=contextPath%>/assets/stylesheets/rtl.min.css" rel="stylesheet" type="text/css">
	<link href="<%=contextPath%>/assets/stylesheets/themes.min.css" rel="stylesheet" type="text/css">
	<link href="<%=contextPath%>/assets/stylesheets/select2.min.css" rel="stylesheet" type="text/css">

	<!--[if lt IE 9]>
		<script src="<%=contextPath%>/assets/javascripts/ie.min.js"></script>
	<![endif]-->

</head>
<style type="text/css">
.page-signup-alt .panel{
	width:40%;
	margin:0 auto;
	padding:27px
}

body{
	color:black;
}

.page-signup-alt .form-header
{
	margin: 20px 0;
}

.form-group
{
	margin-bottom: 8px;
}

p a{font-size: 15px}
</style>


<!-- 1. $BODY ======================================================================================
	
	Body

	Classes:
	* 'theme-{THEME NAME}'
	* 'right-to-left'     - Sets text direction to right-to-left
-->
<body class="theme-default page-signup-alt">
	<!-- Form -->
	<form class="panel form-horizontal" id="jq-validation-form" method="POST" style="width:1000px">
	    <div class="row">
	    	<div class="col-sm-12 form-group no-margin-hr">
	    		<label class="control-label" style="margin-left:10px;margin-top:20px">Assign the case</label>
	    		<span>C20160128054315717</span>
	    		<label class="control-label">to </label>
	    	</div>
	    </div>
	    <hr>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Country</label>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<%-- <%= HtmlComponentUtil.getSelect("facilitiesCountry1", "facilityInfos[0].country", (List<SelectOption>)request.getAttribute("countryDatas"), "United States", "Choose country...") %> --%>
					<select id="seprovince">
                    	<option>--请选择--</option>
                	</select>
					</div>
				</div>
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">State/Provice</label>
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<%-- <%= HtmlComponentUtil.getSelect("facilitiesCountry1", "facilityInfos[0].country", (List<SelectOption>)request.getAttribute("countryDatas"), "United States", "Choose country...") %> --%>
					<select id="secity">
                    	<option>--请选择--</option>
                	</select>
					</div>
				</div>
			</div>
		</div>
		<div class="row" >
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Chapter</label>
					</div>
				</div>
				<div class="col-sm-10">
					<div class="form-group no-margin-hr">
						<%= HtmlComponentUtil.getSelect("facilitiesCountry1", "facilityInfos[0].country", (List<SelectOption>)request.getAttribute("countryDatas"), "United States", "Choose country...") %>
<!-- 					 <select id="">
                    	<option>--请选择--</option>
                	</select> -->
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Name</label>
					</div>
				</div>
				<div class="col-sm-10">
					<div class="form-group no-margin-hr">
						<input type="text" class="form-control" name="abusedPerson.lastName">
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Email</label>
					</div>
				</div>
				<div class="col-sm-10">
					<div class="form-group no-margin-hr">
						<input type="text" class="form-control" name="abusedPerson.lastName">
					</div>
				</div>
			</div>
		</div>
		<div class="row" >
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Type</label>
					</div>
				</div>
				<div class="col-sm-10">
					<div class="form-group no-margin-hr">
						<%= HtmlComponentUtil.getSelect("facilitiesCountry1", "facilityInfos[0].country", (List<SelectOption>)request.getAttribute("countryDatas"), "United States", "Choose country...") %>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-2">
					<div class="form-group no-margin-hr">
						<label class="control-label">Access Portal</label>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<label class="checkbox-inline">
							<input type="checkbox" class="px" name="actionsCheckbox"> <span class="lbl" style="color: black;margin-left:20px">Crim Psych Center</span>
						</label>			
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<label class="checkbox-inline">
							<input type="checkbox" class="px" name="actionsCheckbox"> <span class="lbl" style="color: black">Donor Center</span>
						</label>			
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-10">
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<label class="checkbox-inline">
							<input type="checkbox" class="px" name="actionsCheckbox"> <span class="lbl" style="color: black;margin-left:20px">Abuse Case Management</span>
						</label>			
					</div>
				</div>
				<div class="col-sm-4">
					<div class="form-group no-margin-hr">
						<label class="checkbox-inline">
							<input type="checkbox" class="px" name="actionsCheckbox"> <span class="lbl" style="color: black">Museum Management</span>
						</label>			
					</div>
				</div>
			</div>
		</div>
		<hr>
		<div class="row">
			<div class="col-sm-3">
			</div>
			<div class="col-sm-6">
				<div class="row">
					<div class="col-sm-2">
					</div>
					<div class="col-sm-4">
						<input type="submit" value="Save" class="btn btn-primary btn-lg btn-block" style="border-radius:0px;width:110px; font-size: 20px; margin-bottom:20px">
					</div>
				</div>
			</div>
		</div>
	</form>
	
	<!-- / Form -->

<!-- Get jQuery from Google CDN -->
<!--[if !IE]> -->
	<script type="text/javascript"> window.jQuery || document.write('<script src="<%=contextPath%>/assets/javascripts/jquery-2.0.3.min.js">'+"<"+"/script>"); </script>
<!-- <![endif]-->
<!--[if lte IE 9]>
	<script type="text/javascript"> window.jQuery || document.write('<script src="<%=contextPath%>/assets/javascripts/jquery-1.8.3.min.js">'+"<"+"/script>"); </script>
<![endif]-->


<!-- Pixel Admin's javascripts -->
<script src="<%=contextPath%>/assets/javascripts/bootstrap.min.js"></script>
<script src="<%=contextPath%>/assets/javascripts/pixel-admin.min.js"></script>
<script src="<%=contextPath%>/assets/javascripts/select2.min.js"></script>

<script type="text/javascript">
	window.PixelAdmin.start([
		function () {
			$("#signup-form_id").validate({ focusInvalid: true, errorPlacement: function () {} });
			alert("ffffffff");
			
	        $.ajax({
	            type: "post",
	            contentType: "application/json",
	            url: "/case/GetCountry",
	            data: "{}",
	            success: function (result) {
	                var stroption = '';
	                for (var i = 0; i < result.d.length; i++) {
	                    stroption += '<option value=' + result.d[i].provinceID + '>';
	                    stroption += result.d[i].provincename;
	                    stroption += '</option>';
	                }
	                $('#seprovince').append(stroption);
	            }
	        })

			
		}
	]);

</script>

<!-- Javascript -->
	<script>var init = [];</script>
	<script>
    
		init.push(function () {
			

			
			$("select:not(.unRender)").select2({
			    allowClear: true
			});
	        $.ajax({
	            type: "post",
	            contentType: "application/json",
	            url: "/acms/case/getCountry",
	            data: "{}",
	            success: function (result) {
	                var stroption = '';
	                for (var i = 0; i < result.length; i++) {
	                    stroption += '<option value=' + result[i] + '>';
	                    stroption += result[i];
	                    stroption += '</option>';
	                }
	                $('#seprovince').append(stroption);
	            }
	        })
	                $('#seprovince').change(function () {
            $('#secity option:gt(0)').remove();
             $('#searea option:gt(0)').remove();

             $.ajax({
                 type: "post",
                 contentType: "application/x-www-form-urlencoded",
                 url: "/acms/case/GetProvinceByCty",
                 data: {ctyId: $(this).val()},
                 success: function (result) {
                     var strocity = '';
                     for (var i = 0; i < result.length; i++) {
                         strocity += '<option value=' + result[i] + '>';
                         strocity += result[i];
                         strocity += '</option>';
                     }
                     $('#secity').append(strocity);
                 }
             })
         })

			
			
		});

		window.PixelAdmin.start(init);
	</script>

</body>
</html>
